package com.example.votemanage.config;

import com.example.votemanage.Interceptor.TestInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Slf4j
@Configuration
public class Myconfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        log.debug("注册拦截器---");
        registry.addInterceptor(new TestInterceptor()).addPathPatterns("/*");
        //WebMvcConfigurer.super.addInterceptors(registry);
    }
}
